import request from '@/api/request'

//搜索关键词添加到数据库
function addhistoryaction(data) {
    return request({
        url: "/bufan/search/addhistoryaction",
        method: 'post',
        data
    })
}

// 搜索提示接口
function helperaction(data) {
    return request({
        url: '/bufan/search/helperaction',
        method: 'get',
        data
    })
}

//关键词和搜索历史接口
function indexaction(data) {
    return request({
        url: "/bufan/search/indexaction",
        method: 'get',
        data
    })
}

//清空搜索历史
function clearhistoryAction(data) {
    return request({
        url: "/bufan/search/clearhistoryAction",
        method: 'post',
        data
    })
}

export default {
    addhistoryaction,
    helperaction,
    indexaction,
    clearhistoryAction
}